﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Runtime.Serialization;
using System.Data.Objects.DataClasses;
using System.ComponentModel;
using System.Xml.Serialization;

namespace EnglishRegister.Entities
{
    [Table(Name = "dbo.Student")]
    public class StudentModel : BaseModel<StudentModel>
    {
        #region **Private Variable**
        private int _ID;

        private string _FirstName;

        private string _LastName;

        private string _Address;

        private string _PhoneNo;

        private System.Guid _CourseID;
        private System.Data.Linq.Binary _TimeStamp;

        #endregion

        #region **Public Properties**
        [global::System.Data.Linq.Mapping.Column(Name = "ID", Storage = "_ID", AutoSync = AutoSync.OnInsert, DbType = "Int NOT NULL IDENTITY", IsPrimaryKey = true, IsDbGenerated = true)]
        public int ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                if ((this._ID != value))
                {
                    this._ID = value;
                }
            }
        }

        [global::System.Data.Linq.Mapping.Column(Storage = "_FirstName", DbType = "NVarChar(100)", Name = "FirstName")]
        public string FirstName
        {
            get
            {
                return this._FirstName;
            }
            set
            {
                if ((this._FirstName != value))
                {
                    this._FirstName = value;
                }
            }
        }

        [global::System.Data.Linq.Mapping.Column(Storage = "_LastName", DbType = "NVarChar(100)", Name = "LastName")]
        public string LastName
        {
            get
            {
                return this._LastName;
            }
            set
            {
                if ((this._LastName != value))
                {
                    this._LastName = value;
                }
            }
        }

        [global::System.Data.Linq.Mapping.Column(Storage = "_Address", DbType = "NVarChar(500)", Name = "Address")]
        public string Address
        {
            get
            {
                return this._Address;
            }
            set
            {
                if ((this._Address != value))
                {
                    this._Address = value;
                }
            }
        }

        [global::System.Data.Linq.Mapping.Column(Storage = "_PhoneNo", DbType = "NVarChar(100)", Name = "PhoneNo")]
        public string PhoneNo
        {
            get
            {
                return this._PhoneNo;
            }
            set
            {
                if ((this._PhoneNo != value))
                {
                    this._PhoneNo = value;
                }
            }
        }

        [global::System.Data.Linq.Mapping.Column(Storage = "_CourseID", DbType = "UniqueIdentifier NOT NULL", Name = "CourseID")]
        public System.Guid CourseID
        {
            get
            {
                return this._CourseID;
            }
            set
            {
                if ((this._CourseID != value))
                {
                    this._CourseID = value;
                }
            }
        }

        [global::System.Data.Linq.Mapping.Column(Name = "TimeStamp", Storage = "_TimeStamp", AutoSync = AutoSync.Always, DbType = "rowversion", IsDbGenerated = true, IsVersion = true, UpdateCheck = UpdateCheck.Never)]
        public System.Data.Linq.Binary TimeStamp
        {
            get
            {
                return this._TimeStamp;
            }
            set
            {
                if ((this._TimeStamp != value))
                {
                    this._TimeStamp = value;
                }
            }
        }
        #endregion
    }
}
